package com.ywgt.mapper;

import com.github.pagehelper.Page;
import com.ywgt.pojo.Category;
import com.ywgt.pojo.Goods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商品基本信息表 Mapper 接口
 * </p>
 *
 * @author yiping
 * @since 2021-03-13
 */
public interface GoodsMapper extends BaseMapper<Goods> {

    Page<Goods> selectGoods(@Param("name") String name,@Param("goodSn") String goodsSn,@Param("sort") String sort,@Param("order") String order);


    Page<Goods> selectByCondition(@Param("categoryId") Integer categoryId,@Param("brandId") Integer brandId, @Param("keyword") String keyword,
                                  @Param("isHot") Boolean isHot,@Param("isNew") Boolean isNew,
                                  @Param("sort") String sort, String order);

    List<Goods> selectCateGoryIds(@Param("brandId")Integer brandId,@Param("keyword") String keyword, @Param("isHot")Boolean isHot,@Param("isNew") Boolean isNew);

    void incry(Integer id);
}
